﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MoveLeft : MonoBehaviour
{
    private PlayController _playController;

    public float speed = 30.0f;

    // Start is called before the first frame update
    void Start()
    {
        //_playController = GameObject.Find("Player").GetComponent<PlayController>();

        _playController = FindObjectOfType<PlayController>();
    }

    // Update is called once per frame
    void Update()
    {
        if(!_playController.isGameOver)
            transform.Translate(Vector3.left * speed * Time.deltaTime);
    }
}
